//
//  CommentViewController.swift
//  微博
//
//  Created by mac on 15/12/22.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit

class CommentViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.randomColor()
        title = "\(self.navigationController!.childViewControllers.count)个控制器"
        let additem = UIBarButtonItem(title: "PUSH", style: UIBarButtonItemStyle.Plain, target: self, action: "add")
        navigationItem.rightBarButtonItem = additem
    }
    
    @objc private func add() {
        navigationController!.pushViewController(CommentViewController(), animated: true)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

}
